#!/usr/bin/env ruby

require "openid/consumer/associationmanager"
require "openid/store/memstore"

store = OpenID::MemoryStore.new
ARGV.each do |server_url|
  mgr = OpenID::Consumer::AssociationManager.new(store, URI.parse(server_url))
  puts '=' * 50
  puts "Server: #{server_url}"
  puts mgr.get_association.serialize
  puts '-' * 50
end
